package com.subfg.common.entity.call.result;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.subfg.common.util.common.TimeUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(value=JsonInclude.Include.NON_NULL)
@ApiModel(value = "三方支付信息生成成功后,返回的支付信息")
public class ResultPayModel implements Serializable {
    @ApiModelProperty(value = "时间搓 :微信需要")
    private Long timestap;
    @ApiModelProperty(value = "随机字符串")
    private String nonceStr;
    @ApiModelProperty(value = "字符信息或签名信息")
    private String orderStr;
    @ApiModelProperty(value = "必须要的支付信息")
    private String payid;
    @ApiModelProperty(value = "订单号")
    private String orderNo;
    @ApiModelProperty(value = "家庭组id")
    private String familyGroupId;
    @ApiModelProperty(value = "支付价格")
    private BigDecimal paymentAmount;
    @ApiModelProperty(value = "支付汇率")
    private BigDecimal paymentRate;

    public ResultPayModel(String orderStr, String orderNo, BigDecimal paymentAmount) {
        this.timestap = TimeUtil.getCurrentTime();
        this.orderStr = orderStr;
        this.orderNo = orderNo;
        this.paymentAmount = paymentAmount;
    }
}
